/*
 * 首页api
 *
 */
import { getRequest } from '@/lib/axios'

export const homeApi = {
  /**
   * @description: 经销商基础数据
   */
  dealerHomeIndex: () => {
    return getRequest('/dealer_home/index')
  },
  /**
   * @description: 营销统计
   */
  orderStatistics: (param) => {
    return getRequest('/dealer_home/order_statistics', param)
  },
  /**
   * @description: 库存统计
   */
  stockStatistics: () => {
    return getRequest('/dealer_home/stock_statistics')
  },
  /**
   * @description: 销售统计
   */
  brandSalesStatistics: (param) => {
    return getRequest('/dealer_home/brand_sales_statistics', param)
  },
  /**
   * @description: 仓库出入库动态
   */
  inventoryDynamics: () => {
    return getRequest('/dealer_home/inventory_dynamics')
  },
  /**
   * @description: 业务收款
   */
  businessReceipts: (param) => {
    return getRequest('/dealer_home/business_receipts', param)
  },
  /**
   * @description: 门店订单热力图统计
   */
  getStoreSalesData: (param) => {
    return getRequest('/dealer_home/get_store_sales_data', param)
  }
}

export const searchApi = {
  // 数据动态
  dynamicsData: (param) => {
    return getRequest('/kanban/operating_data_dynamics', param)
  },
  // 销售数据统计
  salesData: (param) => {
    return getRequest('/kanban/sales_statistics', param)
  },
  // 经销商销售
  dealerSales: (param) => {
    return getRequest('/kanban/dealer_sales', param)
  },
  // 业务员销售数据
  salesmanSalesData: (param) => {
    return getRequest('/kanban/salesperson_sales_data', param)
  },
  // 仓配数据概览
  warehouseDataOverview: (param) => {
    return getRequest('/kanban/warehouse_data_overview', param)
  },
  // 配送任务
  deliveryTask: (param) => {
    return getRequest('/kanban/delivery_task', param)
  },
  // 仓库概况
  Warehouse: (param) => {
    return getRequest('/kanban/warehouse_overview', param)
  },
  // 仓库数据
  warehouseData: (param) => {
    return getRequest('/kanban/warehouse_data', param)
  },
  // 退换货
  returnAndExchange: (param) => {
    return getRequest('/kanban/return_and_exchange', param)
  },
  // 配送统计
  task: (param) => {
    return getRequest('/kanban/shipping_statistics', param)
  },
  // 概况仓库
  dataOverview: (param) => {
    return getRequest('/kanban/data_overview', param)
  },
  // 门店销售量
  storeSales: (param) => {
    return getRequest('/kanban/store_sales', param)
  },
  // 门店明细
  storeDetails: (param) => {
    return getRequest('/kanban/store_details', param)
  },
  // 门店增长量
  storeGrowth: (param) => {
    return getRequest('/kanban/store_growth', param)
  },
  // 业务员销售明细
  salespersonSalesDetails: (param) => {
    return getRequest('/kanban/salesperson_sales_details', param)
  },
  // 回款数据
  paymentData: (param) => {
    return getRequest('/kanban/payment_data', param)
  }
}
